#ifndef BULLET_H
#define BULLET_H

#include <QtGui>
#include <QGraphicsScene>
#include <QPen>
#include <QColor>
#include "object.h"

class Bullet : public Object
{

private:
        QRectF m_boundingRect;
        int lifetimer;
public:
        Bullet()
        {
            lifetimer=50;
        }


        ~Bullet(){}

       void paint(QPainter *painter, const QStyleOptionGraphicsItem *,QWidget *)
       {
           QPen pen(QColor(255,50,0), 4.0, Qt::SolidLine, Qt::RoundCap);
           painter->setPen(pen);
           painter->drawLine(0, 14, 0, 0);
       }
       void setBoundingRect(QRectF rect)
       {
           m_boundingRect=rect;
       }

       void step()
       {
            translate(0,10);
            --lifetimer;
       }
};

#endif // BULLET_H
